package boardgamer.common.client.preference;

/**
 * @author garysoed
 */
public interface StringConverter<V> {

  public static final StringConverter<String> STRING_CONVERTER
      = new StringConverter<String>() {
        @Override
        public String toString(String value) {
          return value;
        }

        @Override
        public String valueOf(String stringValue) {
          return stringValue;
        }
      };

  String toString(V value);

  V valueOf(String stringValue);
}
